@import "./iconfont/iconfont";

.smart-popover {
    box-sizing: border-box;

    .smart-popover-ref {
        display: inline-block;

        &.block {
            display: block;
        }
    }

    .smart-popover-wrapper {
        font-size: 14px;
        border: none;
        position: absolute;
        border-radius: 3px;
        color: #373e46;
        overflow-y: visible;
        z-index: 100;
        opacity: 1;
        pointer-events: auto;
        background: #fff;
        box-shadow: 0 8px 16px -4px rgba(9, 45, 66, .2), 0 0 0 1px rgba(9, 45, 66, .05);

        .smart-popover-title {
            height: 38px;
            line-height: 40px;
            position: relative;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            padding: 0 36px 0 36px;
            text-align: center;
            color: rgba(55, 62, 70, 0.77);

            .smart-popover-icon {
                position: absolute;
                top: 0;
                cursor: pointer;
                width: 32px;
                height: 38px;
                line-height: 38px;
                text-align: center;

                i.iconfont {
                    font-size: 20px;
                }

                &.icon-left {
                    left: 0;
                }

                &.icon-right {
                    right: 0;
                }
            }
        }

        .smart-popover-content {
            padding: 5px 15px 12px 15px;
            overflow: auto;

            &.smart-popover-content-nopad {
                padding: 0;
            }
        }

        .smart-popover-footer {
            padding: 8px 15px;
        }

        .smart-popover-footer {
            border-top: 1px solid rgba(0, 0, 0, .1);
        }
    }

    .popover-slideup {
        animation-name: slide-to-top;
        animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
        animation-duration: 0.3s;

    }

    .popover-slidedown {
        animation-name: slide-to-down;
        animation-timing-function: ease-out;
        animation-duration: 100ms;
    }

    @keyframes slide-to-top {
        0% {
            transform: translateY(20px);
            overflow: hidden;
            pointer-events: none;
        }
        100% {
            transform: translateY(0);
            opacity: 1;
            pointer-events: auto;
        }
    }

    @keyframes slide-to-down {
        0% {
            transform: translateY(0px);
            overflow: hidden;
            pointer-events: none;
            opacity: 1;
        }
        100% {
            transform: translateY(20px);
            opacity: 0;
        }
    }
}